GBML manual / Constants

SCANLINES_ROLL

A rolling bar: a band of rows has its green swapped and rolls slowly down the screen, like the hum bar on an old television.

Works differently on Game Boy - A scanline look on the Game Boy darkens some rows by one shade, as a rolling bar or a few thin stripes; see screen_scanlines.

Game Boy Color: not available

Sega Genesis: not built yet

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

SCANLINES_ROLL: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the rolling bar, for screen_scanlines. One band of rows has its green swapped, and the band rolls down the screen and starts again at the top, like the bar of interference that rolls up an old television when its signal is bad. Swapping the green only shows where two pixels side by side have different amounts of green, so a flat area looks the same either way. Pictures with lots of detail show it most.

strength is how tall the bar is: 1 makes it 16 rows, 2 makes it 32, and 3 makes it 64.

A real capture, four pictures of the same striped lighthouse standing in front of a wall of thin blue stripes and a floor of thin gold stripes - first as it is, then with SCANLINES_ROLL at strength 1, 2 and 3 (a bar of rows across the screen turns pink and green, 16, 32 and 64 rows tall, and starts on the same row each time)A real capture, four pictures of the same striped lighthouse standing in front of a wall of thin blue stripes and a floor of thin gold stripes - first as it is, then with SCANLINES_ROLL at strength 1, 2 and 3 (a bar of rows across the screen turns pink and green, 16, 32 and 64 rows tall, and starts on the same row each time)
A real capture, four pictures of the same striped lighthouse standing in front of a wall of thin blue stripes and a floor of thin gold stripes - first as it is, then with SCANLINES_ROLL at strength 1, 2 and 3 (a bar of rows across the screen turns pink and green, 16, 32 and 64 rows tall, and starts on the same row each time)

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

speed is how many rows the pattern travels down the screen every frame. 0 holds it still, a negative number sends it up, 0.25 is slow and 1 is quick. The pattern moves four rows at a time, because that is how the console reads it. It belongs to the rows of the screen.

A real capture, 16 frames played in a loop - a bar of pink and green rows rolls down the screen and comes round again at the topA real capture, 16 frames played in a loop - a bar of pink and green rows rolls down the screen and comes round again at the top
A real capture, 16 frames played in a loop - a bar of pink and green rows rolls down the screen and comes round again at the top

The pattern moving, sped up: sixteen real pictures four frames apart, played 70 milliseconds each, at strength 3. It is a whole turn of the pattern, so the loop has no seam. This picture is an animated PNG; a viewer that cannot animate shows its first frame.

Example

screen_scanlines(SCANLINES_ROLL, 2, 0.5);

A bar of interference that rolls down the screen. Call it once, for example when the room starts - it keeps going by itself until you call screen_scanlines(SCANLINES_NONE, 0, 0) or a room is loaded.

See also: screen_scanlinesSCANLINES_NONESCANLINES_STATIC